﻿@model IEnumerable<YashuMedical.Drug>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h4 class="well">Drug Management</h4>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table" id="tblDrugs">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Type)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.NappiCode)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Description)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.PackPrice)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.PackSize)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Schedule)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.ListPrice)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CostPrice)
            </th>
            @*<th>
                @Html.DisplayNameFor(model => model.Strength)
            </th>*@
            <th>
                @Html.DisplayNameFor(model => model.OHQ)
            </th>
            @*<th>
                @Html.DisplayNameFor(model => model.Barcode)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.MinReorderLevel)
            </th>*@
            <th>
                @Html.DisplayNameFor(model => model.Valid)
            </th>
            @*<th>
                    @Html.DisplayNameFor(model => model.ifkConsultsType)
                </th>*@
            @*<th>
                    @Html.DisplayNameFor(model => model.ProcessDateTime)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.ProcessUserName)
                </th>*@
            <th>
                @Html.DisplayNameFor(model => model.msManufacturer.ManufacturerCode)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Type)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.NappiCode)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Description)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.PackPrice)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.PackSize)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Schedule)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ListPrice)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.CostPrice)
                </td>
                @*<td>
                    @Html.DisplayFor(modelItem => item.Strength)
                </td>*@
                <td>
                    @Html.DisplayFor(modelItem => item.OHQ)
                </td>
                @*<td>
                    @Html.DisplayFor(modelItem => item.Barcode)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.MinReorderLevel)
                </td>*@
                <td>
                    @Html.DisplayFor(modelItem => item.Valid)
                </td>
                @*<td>
                        @Html.DisplayFor(modelItem => item.ifkConsultsType)
                    </td>*@
                @*<td>
                        @Html.DisplayFor(modelItem => item.ProcessDateTime)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.ProcessUserName)
                    </td>*@
                <td>
                    @Html.DisplayFor(modelItem => item.msManufacturer.ManufacturerCode)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.pkDrugID }) |
                    @Html.ActionLink("Details", "Details", new { id = item.pkDrugID }) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.pkDrugID })
                </td>
            </tr>
        }
    </tbody>
</table>
<script>
    $(document).ready(function () {
        $('#tblDrugs').dataTable({
        });
    });
</script>